//#include <sys/types.h>
#include <sys/stat.h> 
#include <fcntl.h> 
//#include <unistd.h> 
#include <sys/mman.h> 
#include <stdio.h>

main(int argc, char *argv[])
{
int fd;
void *start;
struct stat sb;
if (argc!=2) {printf("Usage: printlink linkfile\n");return;}
fd=open(argv[1],O_RDONLY);
fstat(fd,&sb);
start=mmap(NULL,sb.st_size,PROT_READ,MAP_PRIVATE,fd,0);
if (start==MAP_FAILED) return;
printf("%s\n",start);
munmap(start,sb.st_size); 
close(fd);
}
